import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)
export default new Vuex.Store({
  plugins: [
    createPersistedState({
      key: 'hm--vuex-token',
      storage: window.localStorage,
      paths: ['user.token']
    })
  ],
  // 组合模块的配置项
  modules: {
    user
  }
})
